layui.use('element', function () {
    var element = layui.element;
});

Vue.component('union-header', {
    template: `<div class="layui-header">
        <div class="layui-logo">{{header.logo}}</div>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <img :src="header.userImg" class="layui-nav-img">
                    {{header.userName}}
                </a>
            </li>
            <li class="layui-nav-item"><a href="">退了</a></li>
        </ul>
    </div>`,
    props: {
        'header': {
            type: Object
        }
    }
})

Vue.component('uniocn-side', {
    template: ` <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" lay-filter="test">
                <li class="layui-nav-item" v-for="item in side">
                    <a href="javascript:;">{{item.sidebar}}</a>
                       <dl class="layui-nav-child" v-if="item.sidebarArr.length>0">
                         <dd v-for="l in item.sidebarArr">
                           <a :href="l.href">{{l.list}}</a>
                         </dd>
                      </dl>
                </li>
                
            </ul>
        </div>
    </div>`,
    props: {
        'side': {
            type: Array
        }
    }
})
